package com.zy.web.demo.duoxiancheng.demo9;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/7/29 14:28
 * a线程调用带synchronized的方法，b调用带synchronized的方法，a先执行，b线程等a执行完才可以执行
 */
public class Test9 {

    public static void main(String[] args) {
        Demo9 demo9 = new Demo9();
        MyThread9A myThread9A = new MyThread9A(demo9);
        MyThread9B myThread9B = new MyThread9B(demo9);
        myThread9A.start();
        myThread9B.start();

    }

}
